package fr.umlv.galcon.item;

import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.geom.Point2D;

public interface GraphicItem {
    /**
     * Draw the graphic item
     * 
     * @param graphics
     */
    public void draw(Graphics2D graphics);

    /**
     * Function which test if it intersect an other item
     * 
     * @param item
     * @return true if it is intersected else false
     */
    public boolean intersect(GraphicItem item);

    /**
     * Get the Item's shape
     * 
     * @return
     */
    public Shape getShape();

    /**
     * Function which test if contains the position
     * 
     * @param p
     *            : the position to test
     * @return true if it is intersected else false
     */
    public boolean contains(Point2D p);

}
